<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>图像文件批量导入</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
    />
    <link rel="stylesheet" href="../js/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../style/admin.css" media="all"/>
    <link rel="stylesheet" href="../style/home.css" media="all"/>
    <script src="../js/layui/layui.js"></script>
    <style type="text/css">
        .layui-layout-right {
            margin: 5px 10px 0 0;
        }
    </style>
</head>

<body>
<div class="layui-card" style="height: 100%">
    <div class="layui-card-header font20">
        <div class="layui-title">图像文件批量导入</div>
        <div class="layui-layout-right" style="font-size: 12px; ">
            <div class="layui-btn-group" style="float: left; margin-right: 10px;">
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="newImportTask">
                    <i class="layui-icon layui-icon-download-circle"></i>新增导入任务
                </button>
            </div>
            <input style="display: none" type="file"
                   accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                   name="file" id="getFile" oninput="updateFile();">
            <div class="layui-input-inline" style="width: 300px; ">
                <form class="layui-form" lay-filter="fondData" action="" id="fondData">
                    <select name="projectList" id="projectList" lay-filter="projectList" lay-verify="required"
                            style="color: #0C0C0C;">
                        <option
                                th:each="project : ${projectsList}"
                                th:value="${project.id}" th:text="${project.name}">
                        </option>
                    </select>
                </form>
            </div>

        </div>
    </div>
    <div class="layui-card-body" style="height: calc(100% - 63px);">
        <div class="layui-row layui-col-space12">
            <div class="layui-col-xs1">
                <div class="layui-card">
                    <div class="layui-card-body" style="padding: 0; margin: 0">
                        <table id="taskTable" lay-filter="taskTable" class="layui-hide-headers  list-table"></table>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs11">
                <table id="dataTable" lay-filter="dataTable"></table>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="operationBar">
    <a lay-filter="del" href="#" lay-event="del"><i class="layui-icon layui-icon-delete p3" title="删除"></i></a>
    {{#  if(d.status === 0){ }}
    <a lay-filter="execution" href="#" lay-event="execution">
        <i class="layui-icon layui-icon-play p3" title="执行"></i>
    </a>
    {{#  } else if(d.status > 0){ }}
    <a lay-filter="detail" href="#" lay-event="detail"
    ><i class="layui-icon layui-icon-read p3" title="浏览导入明细"></i
    ></a>
    {{#  } }}
</script>


<script type="text/html" id="fillingModelTpl">
    {{#  if(d.model === 1){ }}
    <span>扫描文件图像</span>
    {{#  } else if(d.model === 2){ }}
    <span>已处理图像</span>
    {{#  } }}
</script>
<script type="text/html" id="statusTpl">
    {{#  if(d.status === 0){ }}
    未执行
    {{#  } else if(d.status === 1){ }}
    <span style="color: #1E9FFF;">执行中</span>
    {{#  } else if(d.status === 2){ }}
    <span style="color: #2F4056;">已执行</span>
    {{#  } else if(d.status === 3){ }}
    <span style="color: #FF5722;">已执行，错误</span>
    {{#  } }}
</script>
<script type="text/javascript" src="../js/lib/common.js"></script>
<script type="text/javascript" src="../js/lib/watermark.js"></script>
<script>
    loadScript("../js/modules/import/imagesImport.js");
</script>
</body>
</html>